﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Chapter01
{
    public class CSharpSyntaxBasis
    {
        public string Keyword { get; set; }

        public string TypeDefinition { get; set; }

        public string Main { get; set; }

        public string StatementAndSeparator { get; set; }

        public string Blank { get; set; }

        public void CodeListing()
        {
            MainMethod();
            HelloWorld();
            MainArgs();
            MultiStatements();
            RowspanStatements();
            NotIndent();
            RemoveBlank();
        }

        private void MainMethod()
        {
            var coding =
@"class HelloWorld
{
    ...
}";
            Console.WriteLine(coding);
            Console.WriteLine();
        }

        private void HelloWorld()
        {
            var coding =
@"class HelloWorld
{
    static void Main()
    {
         Console.WriteLine(""Hello, My name is Inigo Montoya"");
    }
}";
            Console.WriteLine(coding);
            Console.WriteLine();
        }

        private void MainArgs()
        {
            var coding =
@"static void Main(string[] args)
{
    ...
}";
            Console.WriteLine(coding);
            Console.WriteLine();
        }

        private void MultiStatements()
        {
            Console.WriteLine("Up"); Console.WriteLine("Down");
            Console.WriteLine();
        }

        private void RowspanStatements()
        {
            Console.WriteLine(
                "Hello. My name si Inigo Montoya.");
        }

        private void NotIndent()
        {
            var coding =
@"class HelloWorld
{
static void Main()
{
Console.WriteLine(""Hello Inigo Montoya."");
}
}";
            Console.WriteLine(coding);
            Console.WriteLine();
        }

        private void RemoveBlank()
        {
            var coding =
@"class HelloWorld
{static void Main()
{Console.WriteLine(""Hello Inigo Montoya."");}}";
            Console.WriteLine(coding);
            Console.WriteLine();
        }
    }
}
